package weWork;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

public class BasePage {
    final WebDriver driver;

    public BasePage(WebDriver driver) {
        this.driver=driver;

    }
    public WebElement find(By by){

        WebElement element=null;
        try{
            element=driver.findElement(by);
        }catch (Exception e){
            e.printStackTrace();
            //element=this.find(by);
        }
        return element;
    }
    public boolean find2(By by){
        boolean b;
        try {
            driver.findElement(by);
            b=true;
        }catch (Exception e){
            e.printStackTrace();
            b=false;
        }
        return b;
    }
    public void click() {
    }
    public void sendkeys(){

    }
}
